html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-family: "IBM Plex Mono", monospace;
}

.wrapper {
    position: relative;
    width: 95vmin;
    height: 95vmin;
    max-width: 500px;
    max-height: 500px;
    border-radius: 8px;
    list-style: none;
    overflow: hidden;
    padding: 8px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid #00f;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0s linear;
}

.overlay-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 4px;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #00f;
    font-size: 18px;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}

.button:focus {
    outline: none;
    color: #fff;
    background: #00f;
}

.button:focus:active {
    background: #fff;
    color: inherit;
}

.button:disabled {
    color: inherit;
    cursor: default;
}

.hidden {
    visibility: hidden;
}

.list-move {
    transition: -webkit-transform 0.4s ease;
    transition: transform 0.4s ease;
    transition: transform 0.4s ease, -webkit-transform 0.4s ease;
}
